package com.online.fund.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.online.fund.spider.dao.SharesMoniterConfigDao;
import com.online.fund.spider.entity.SharesMoniterConfig;
import com.online.fund.spider.entity.SharesRefIdInfo;

@Service
public class SharesMoniterConfigService {
	
	@Resource
	private SharesMoniterConfigDao configDao;

	/**
	 * 查询股票是否存在
	 * @param sharesCode
	 * @return
	 */
	public SharesRefIdInfo getSharesRefIdInfo(String sharesCode) {
		return configDao.getSharesRefIdInfo(sharesCode);
	}

	public void addSharesMoniterConfig(SharesMoniterConfig config) {
		configDao.addSharesMoniterConfig(config);
	}

	public void updateSharesMoniterConfig(SharesMoniterConfig config) {
		configDao.updateSharesMoniterConfig(config);
	}

	public void deleteSharesMoniterConfig(Long id) {
		configDao.deleteSharesMoniterConfig(id);
	}

	public SharesMoniterConfig getSharesMoniterConfigById(Long id) {
		return configDao.getSharesMoniterConfigById(id);
	}

	public List<SharesMoniterConfig> getSharesMoniterConfigList(Integer enabled) {
		return configDao.getSharesMoniterConfigList(enabled);
	}

}
